package com.atguigu.realtime.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import org.apache.commons.beanutils.BeanUtils;

import java.lang.reflect.InvocationTargetException;
import java.math.BigDecimal;

@Data
@AllArgsConstructor
public class OrderCouponWide {


    Long detail_id;
    Long order_id ;
    Long sku_id;
    BigDecimal order_price ;
    Long sku_num ;
    String sku_name;


    Long province_id;
    String order_status;
    Long user_id;
    BigDecimal final_total_amount;
    BigDecimal benefit_reduce_amount;
    BigDecimal original_total_amount;
    BigDecimal final_detail_amount ;
    BigDecimal feight_fee;
    String expire_time;
    String create_time;
    String operate_time;


    Long order_detail_coupon_id;

    Long order_detail_id ;

    Long coupon_id;


    public OrderCouponWide(OrderWide orderWide, OrderDetailCoupon orderDetailCoupon){
        try {
            BeanUtils.copyProperties(this,orderWide);
            BeanUtils.copyProperties(this,orderDetailCoupon);
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        }

        this.order_detail_coupon_id= orderDetailCoupon.getId();

    }


}
